package com.ghj.demo2;

/**
 * @author ghj
 * @create 2023-06-17 19:38
 */
public class UserServiceProxy implements UserSerive{

    private UserServiceImpl userService;

    public void setUserService(UserServiceImpl userService) {
        this.userService = userService;
    }


    @Override
    public void add() {
        userService.add();
        log();
    }

    @Override
    public void delete() {
        userService.delete();
        log();
    }

    @Override
    public void update() {
        userService.update();
        log();
    }

    @Override
    public void query() {
        userService.query();
        log();
    }

    public void log(){
        System.out.println("日志");
    }
}
